AxisSelected Event

       

Occurs when the user clicks on a chart axis.

Syntax

Private Sub object_AxisSelected (axisId As Integer, axisIndex As Integer, mouseFlags As Integer, cancel As Integer )

The AxisSelected event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
axisId Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlags Integer. An integer that indicates whether key is held down when the mouse button is clicked, as described in Settings.
cancel Integer. An integer that is not used at this time.

Settings

The event handler determines which axis is selected and sets axisId to:

Constants Value Description
VtChAxisIdX 0 If the x axis is affected.
VtChAxisIdY 1 If the y axis is affected.
VtChAxisIdY2 2 If the secondary y axis is affected.
VtChAxisIdZ 3 If the z axis is affected.
VtChAxisIDNone 4 No axis.

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants Description
VtChMouseFlagShiftKeyDown If the SHIFT key is held down.
VtChMouseFlagControlKeyDown If the CONTROL key is held down.